package mlz.arr;

//数组的遍历
public class Demo03 {
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5};
//        System.out.println(arr[0]); //数组名[下标]
//        System.out.println(arr[1]);
//        System.out.println(arr[2]);
//        System.out.println(arr[3]);
//        System.out.println(arr[4]);

        //获取所有数组的元素 -> 遍历数组下标
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }
    }
}
